package com.firmboy.jdbc.hello.service;

import com.firmboy.jdbc.hello.dao.AccountDaoImpl;
import com.firmboy.jdbc.hello.model.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * account的service层
 *
 * @author firmboy
 * @create 2018-03-12 上午11:36
 **/
@Service
public class AccountServiceImpl {

    @Autowired
    private AccountDaoImpl accountDao;

    public void add(Account account){
        accountDao.add(account);

    }

    public Account findAccountById(int id){
        return accountDao.findAccountById(id);
    }

    public List<Account> getAccounts(){
        return accountDao.getAccounts();
    }
}
